package com.changgou.oauth.service;

import com.changgou.oauth.util.AuthToken;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface AuthService {

    /***
     * 登录方法
     * @param username 用户名
     * @param password 用户密码
     * @param clientId 客户端id
     * @param clientSecret 客户端密码
     * @return
     */
    AuthToken login(String username, String password, String clientId, String clientSecret);

    /***
     * 退出方法
     * @param request
     * @param response
     */
    void logout(HttpServletRequest request, HttpServletResponse response);
}
